﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aliphant.Common.Caches
{
    public class PublicCache : Singleton<PublicCache>
    {
        Hashtable _cache = new Hashtable();

        public void Add(string key, object? value)
        {
            _cache.Add(key, value);
        }

        public object? Get(string key)
        {
            if (_cache.ContainsKey(key))
            {
                return _cache[key];
            }
            return null;
        }

        public void Remove(string key)
        {
            if (_cache.ContainsKey(key))
            {
                _cache.Remove(key);
            }
        }
    }
}
